package org.crackjack.android.async;

import android.os.AsyncTask;

public abstract class ChainAsyncTask<A, B, C> extends AsyncTask<A, B, C> {

	private ITaskFinishedHandler<C> taskFinishedHandler;
	
	public ChainAsyncTask(ITaskFinishedHandler<C> taskFinishedHandler) {
		this.taskFinishedHandler = taskFinishedHandler;
	}
	
	@Override
	protected void onPostExecute(C result) {
		taskFinishedHandler.onTaskFinished(result);
	}
}